#include<stdio.h>

int main()
{
	int n,i,x,y,t;
	scanf("%d",&n);
	t=n+1;
	while (1)
	{
		x=t;
		y=n;
		while (y>0)
		{	
			if (((x-1)%n==0)&&((x-1)>=n))
			{
				x=x-1-(x-1)/n;
				y--;
			}
			else
				break;
		}
		if (y>0)
			t+=n;
		else
			break;
	}
	printf("%d\n",t);
	for (i=1;i<=n;i++)
	{
		printf("%d\n",(t-1)/n);
		t=t-1-(t-1)/n;
	}	
}
